/**
 * 封装权限管理接口 增删改查
 */
import request from '@/utils/request'

// 获取所有权限点
export const getPermissionList = () => request({
  url: '/sys/permission'
})

// 增加权限点
export const addPermission = data => request({
  method: 'POST',
  url: '/sys/permission',
  data
})

// 根据id获取权限点
export const getPermissionById = id => request({
  url: `/sys/permission/${id}`
})

// 根据id更新权限点
export const updatePermissionById = data => request({
  method: 'PUT',
  url: `/sys/permission/${data.id}`,
  data
})

// 根据id删除权限点
export const delPermissionById = id => request({
  method: 'DELETE',
  url: `/sys/permission/${id}`
})

